Skip to content

Add --from/--to closed-window filter to report and stats#8

Merged
lex0c merged 1 commit intomainfrom
feat/report-window
Apr 20, 2026
Merged

Add --from/--to closed-window filter to report and stats#8
lex0c merged 1 commit intomainfrom
feat/report-window

Conversation

@lex0c
Copy link
Copy Markdown
Owner

@lex0c lex0c commented Apr 20, 2026

The report command only supported --since (relative window "last N days/months"). stats was the same. Users wanting a past quarter or a release-to-release window had to either re-run extract (heavy, costs minutes on large repos) or fall back to diff — which outputs a comparison table instead of a full report/stats view.

Add --from and --to on both report and stats (already existed on diff). Dates are YYYY-MM-DD, both boundaries inclusive, UTC day granularity (matches LoadOptions.From/To semantics already used by diff). --since and --from/--to are mutually exclusive at the CLI layer — both specify a window and combining them is ambiguous ("does --since shift --from forward, or override it?"). --from > --to is rejected up front.

Parity check: "Q1 2025 on pi-hole" returns 156 commits / 17 devs under both stats --stat summary and report, with boundaries 2025-01-01 through 2025-03-31 inclusive. Edge cases verified: open-forward (only --from), open-backward (only --to), single-day window, and pre-repo-birth empty window (0 commits, graceful).

Filter lives at load time, not extract time — consistent with the design principle that extract produces canonical raw data and consumers apply analytical lenses. Rename chains stay intact in the JSONL; only what gets displayed changes.

The report command only supported --since (relative window "last N
days/months"). stats was the same. Users wanting a past quarter or a
release-to-release window had to either re-run extract (heavy, costs
minutes on large repos) or fall back to diff — which outputs a
comparison table instead of a full report/stats view.

Add --from and --to on both report and stats (already existed on
diff). Dates are YYYY-MM-DD, both boundaries inclusive, UTC day
granularity (matches LoadOptions.From/To semantics already used by
diff). --since and --from/--to are mutually exclusive at the CLI
layer — both specify a window and combining them is ambiguous
("does --since shift --from forward, or override it?"). --from >
--to is rejected up front.

Parity check: "Q1 2025 on pi-hole" returns 156 commits / 17 devs
under both `stats --stat summary` and `report`, with boundaries
2025-01-01 through 2025-03-31 inclusive. Edge cases verified:
open-forward (only --from), open-backward (only --to), single-day
window, and pre-repo-birth empty window (0 commits, graceful).

Filter lives at load time, not extract time — consistent with the
design principle that extract produces canonical raw data and
consumers apply analytical lenses. Rename chains stay intact in the
JSONL; only what gets displayed changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@lex0c
Copy link
Copy Markdown
Owner Author

lex0c commented Apr 20, 2026

@codex review

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lex0c lex0c merged commit 5006179 into main Apr 20, 2026
4 checks passed
@lex0c lex0c deleted the feat/report-window branch April 20, 2026 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant